package com.Lyy.Mapper;

import com.Lyy.cla.MBStudent;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface StudentMapper {
    @Select("select student_id as id,student_name as name from students ")
    @Results({
            @Result(column = "card_id" ,property = "card")
    })
    List<MBStudent> MBSelectStudent(MBStudent stu);
    @Update("UPDATE `student`.`students` SET `student_name` = '${name}' WHERE `student_id` = '${id}'")
    int MBUpdStudent(MBStudent stu);
    @Insert("INSERT INTO `student`.`students` (`student_id`, `student_name`) VALUES ('${id}', '${name}')")
    int MBAddStudent(MBStudent stu);
    @Delete("DELETE FROM `student`.`students`")
    int MBDelStudent(MBStudent stu);
}
